<!--
* @description: 布局标题组件
* @author: Jvyou
* @createTime: 2025/11/24 01:55
-->
<script setup lang="ts">
import type {CSSProperties} from "vue";

const props = withDefaults(defineProps<{
  size?: number,
  title?: string,
  color?: string,
}>(), {
  size: 16,
  title: '',
  color: '#000'
})

const titleStyle = computed<CSSProperties>(() => {
  return {
    fontSize: `${props.size}px`,
    color: props.color?? '#000',
  }
})
</script>

<template>
  <span v-if="title || $slots.default" :style="titleStyle" class="font-semibold">
    <slot>
      {{ title }}
    </slot>
  </span>
</template>

<style scoped>

</style>
